package cn.iocoder.yudao.module.reading.controller.app.recording.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;

/**
 * 录音上传 Request VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 录音上传 Request VO")
@Data
public class RecordingUploadReqVO {

    @Schema(description = "绘本ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "绘本ID不能为空")
    private Long bookId;

    @Schema(description = "绘本页面ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "绘本页面ID不能为空")
    private Long pageId;

    @Schema(description = "录音文件", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "录音文件不能为空")
    private MultipartFile file;

    @Schema(description = "录音时长（秒）", requiredMode = Schema.RequiredMode.REQUIRED, example = "30")
    @NotNull(message = "录音时长不能为空")
    @Min(value = 1, message = "录音时长最小为1秒")
    @Max(value = 300, message = "录音时长最大为300秒")
    private Integer duration;

    @Schema(description = "录音质量", example = "medium")
    private String quality;

    @Schema(description = "录音标题", example = "我的配音作品")
    private String title;

    @Schema(description = "录音描述", example = "这是我为这个页面录制的配音")
    private String description;

    @Schema(description = "是否公开分享", example = "false")
    private Boolean isPublic = false;

}
